package com.eningqu.aipen.ui.mine;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.eningqu.aipen.demo.R;
import com.eningqu.aipen.demo.databinding.ActivityPersonalBinding;
import com.eningqu.aipen.logic.model.mine.DoctorBean;
import com.eningqu.aipen.ui.base.BaseActivity;
import com.eningqu.aipen.utils.GlideUtils;

/**
 * Package:com.eningqu.aipen.ui.mine
 * Author:starr
 * Time:11/22/2023 8:25 PM
 * Description:
 */
public class PersonalActivity extends BaseActivity<ActivityPersonalBinding> {


    private static DoctorBean.EmrYsInfoDTO ysBean;

    public static void startAction(Context context, Bundle bundle) {
        Intent intent = new Intent(context, PersonalActivity.class);
        ysBean = (DoctorBean.EmrYsInfoDTO) bundle.getSerializable("ysBean");
        context.startActivity(intent);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_personal;
    }

    @Override
    protected void initView() {
        mBinding.setClick(new PersonalClick());
    }

    @Override
    protected void initData() {
        GlideUtils.loadCircleImage(getContext(), ysBean.emrYsImg, mBinding.ivUser);
        mBinding.tvName.setText(ysBean.emrYsName);
        mBinding.tvSex.setText(ysBean.emrYsSex);
        mBinding.tvSection.setText(ysBean.emrYsSection);
        mBinding.tvPhone.setText(ysBean.emrYsPhone);
        mBinding.tvBirth.setText(ysBean.emrYsBirth);
    }

    @Override
    protected void async() {

    }

    public class PersonalClick {
        public void back(View view) {
            finish();
        }
    }
}
